﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Graphene.Processing
{    
    public delegate void ProcessedHandler(object sender);

    interface Processor : Graphene.Processing.ProcessorSource
    {
        /**
         * Processing cycle. The most important part of the Processor.
         * Computes the results in function of the source(s) !!!! source or sources?#$$ .
         * Should increment++ an nSourcesProcessed attribute later on.
         */
        void MyRun();

        /**
         * Resets the nSourcesProcessed attribute to 0. Used to measure the number of processing cycles per seconds.
         */
        void ResetNProcessingCycles();

        /**
         * Whenever a processing cycle terminates, the handlers added by this method
         * will be called. Independent of the result changes, focusing on processing cycles.
         */ 
        void AddProcessedHandler(Graphene.Processing.ProcessedHandler handler);              

        
        /* Properties: */
        
        double AverageProcessTime
        {
            get;
        }

        int LongestProcessTime
        {
            get;
        }

        int NProcessingCycles
        {
            get;
        }
    }
}